/*
 * @Author: NaturalHulk 2066634567@qq.com
 * @Date: 2024-10-11 14:25:06
 * @LastEditors: NaturalHulk 2066634567@qq.com
 * @LastEditTime: 2024-11-19 09:12:47
 * @FilePath: /xhs-mom-new/plngin/MyPlugin.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import type { PluginOption, ViteDevServer } from 'vite'

const colors = require('picocolors')
export default function (): PluginOption {
  return {
    name: 'printLogo',
    apply: 'serve',
    enforce: 'pre',
    configureServer(server: ViteDevServer) {
      const print = server.printUrls
      server.printUrls = () => {
        console.info(
          colors.green(`                                                   
             gg
`)
        )
        print()
      }
    }
  }
}
